<template>
  <div>
    <bread class="filter">
      <h1>校管项目活动管理
        <span class="el-icon-arrow-right icon"></span>
        <span class="sub-title">2018年校级教研重点项目</span>
      </h1>
      <normal-filter
        :label="filters.text"
        @change="handleLanguage"
        :options="filters.dataset"
        class="filter-block">
      </normal-filter>
    </bread>
    <pageContent hasPagination>
      <el-table
        :data="tableData"
        border
        header-row-class-name="custom-table-header-dark-gray"
        style="width: 100%">
        <el-table-column
          prop="date"
          label="序号"
          width="150">
          <template slot-scope="scope">
            <el-button type="text" size="small">{{scope.row.num}}</el-button>
          </template>
        </el-table-column>
        <el-table-column
          prop="name"
          label="课题名称"
          width="120">
          <template slot-scope="scope">
            <el-button type="text" size="small">{{scope.row.name}}</el-button>
          </template>
        </el-table-column>
        <el-table-column
          prop="province"
          label="资助类型"
          width="120">
        </el-table-column>
        <el-table-column
          prop="city"
          label="附件"
          width="120">
        </el-table-column>
        <el-table-column
          prop="address"
          label="申请人"
          width="300">
        </el-table-column>
        <el-table-column
          prop="zip"
          label="所属学院"
          width="120">
        </el-table-column>
        <el-table-column
          prop="zip"
          label="状态"
          width="120">
        </el-table-column>
        <el-table-column
          prop="zip"
          label="初审操作"
          width="120">
        </el-table-column>
        <el-table-column
          prop="zip"
          label="所属学院"
          width="120">
        </el-table-column>
        <el-table-column
          prop="zip"
          label="所属学院"
          width="120">
        </el-table-column>
        <el-table-column
          prop="zip"
          label="所属学院"
          width="120">
        </el-table-column>
        <el-table-column
          prop="zip"
          label="所属学院"
          width="120">
        </el-table-column>
        <el-table-column
          prop="zip"
          label="所属学院"
          width="120">
        </el-table-column>
        <el-table-column
          label="专家意见以及评分"
          align="center"
          >
          <el-table-column
            prop="zip"
            label="平均分"
            width="120">
          </el-table-column>
          <el-table-column
            prop="zip"
            label="通过"
            width="120">
          </el-table-column>
          <el-table-column
            prop="zip"
            label="暂缓以下"
            width="120">
          </el-table-column>
          <el-table-column
            prop="zip"
            label="专家1"
            width="120">
          </el-table-column>
          <el-table-column
            prop="zip"
            label="专家1"
            width="120">
          </el-table-column>
        </el-table-column>
        <el-table-column
          label="复审操作"
          width="100">
          <template slot-scope="scope">
            <el-button type="text" size="small">退回修改</el-button>
          </template>
        </el-table-column>
        <el-table-column
          fixed="right"
          label="初审操作"
          width="100">
          <template slot-scope="scope">
            <el-button type="text" size="small">未开始</el-button>
          </template>
        </el-table-column>
      </el-table>
    </pageContent>

    <pagination
      :total="total"
      :page-size="pageSize"
      @changePage="fetchData">
    </pagination>
  </div>

</template>

<script>
import pagination from 'components/pagination';
import NormalFilter from 'components/NormalFilter';
import PopFilter from 'components/PopFilter';

export default {
  name: 'hello',
  data () {
    return {

      tableData: [{
          num: 1,
          date: '2016-05-03',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1518 弄',
          zip: 200333
        }, {
          num: 1,
          date: '2016-05-02',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1518 弄',
          zip: 200333
        }, {
          num: 1,
          date: '2016-05-04',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1518 弄',
          zip: 200333
        }, {
          num: 1,
          date: '2016-05-01',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1518 弄',
          zip: 200333
        }],
      total: 1000,
      pageSize: 30,
      filters: {
        dataset: [{txt: '全部', val: '0'}, {txt: '中文成果', val: '1'}, {txt: '英文成果', val: '2'}],
        text: '评审状态'
      },
      statusFilterOptions: [{txt: '全职', val: '3'}, {txt: '兼职', val: '2'}, {txt: '退休', val: '1'}],
    }
  },
  methods: {
    createPro(){
      this.$router.push('/index/intramural-project/project-create')
    },
    getColumnWidth(item) {
      switch (item.en) {
      case 'b':
      case 'd':
      case 'e':
      case 'f':
      case 'g':
        return 100;
      case 'h':
        return 120;
      }
    },
    fetchData(page) {
      // console.log(page);
    },
    openMessageBox() {
      this.$confirm('点击确认后，将向学院管理员发送考核提交提醒通知。', '提醒学院提交考核', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
      }).then(() => {
        this.$message({
          type: 'success',
          message: '删除成功!'
        });
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        });
      });
    },
    handleLanguage() {

    },
    handlePopChange() {

    },
  },
  components: {
    pagination,
    NormalFilter,
    PopFilter
  }
};
</script>
<style scoped lang="scss">
  .primary-color {
    color: var(--success-color);
  }
  .cur_select {
    margin-left: 20px;
  }
</style>
